package one.stand.controller;

import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import one.stand.aop.ApiController;
import one.stand.model.ResultModel;
import one.stand.request.SubRequest;
import one.stand.response.SubscriptionNewResponse;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestAttribute;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * 订阅消息
 * @author luoyang
 */
@RestController
@RequestMapping("crmApi/subscription")
@Api(description = "订阅消息",tags="订阅消息")
public class SubscriptionController extends BaseController{

    /**
     * 订阅消息
     * @param request
     * @return
     */
    @ApiOperation(value = "订阅消息")
    @PostMapping("getComanySub")
    @ApiController(isLogin = true,paramClass = SubRequest.class)
    public ResultModel<List<SubscriptionNewResponse>> getComanySub(@RequestAttribute SubRequest request){
        return crmFegin.getComanySub(request);
    }

}
